home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_bas
/
pbc32.zip
/
PBC$BAS.ZIP
/
SETLABEL.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-04-10
|
1KB
|
41 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone (C) Copyright 1996 Charon Software, All Rights Reserved |
' | |
' +----------------------------------------------------------------------+
DECLARE FUNCTION GetDrive$ ()
DECLARE SUB GetSub1 (Drive$, SubDir$, SubDirLen%, ErrCode%)
DECLARE SUB SetSub (Subdir$, ErrCode%)
DECLARE SUB SetLabel00 (Drive$, Label$, ErrCode%)
DECLARE SUB SetLabel01 (Drive$, ErrCode%)
SUB SetLabel (Drive$, Label$, ErrCode%)
IF INSTR(Label$, "?") OR INSTR(Label$, "*") THEN
ErrCode% = -1
ELSE
IF LEN(Drive$) THEN
D$ = Drive$
ELSE
D$ = GetDrive$
END IF
CurSub$ = SPACE$(80)
GetSub1 D$, CurSub$, CurSubLen%, ErrCode%
IF ErrCode% = 0 THEN
CurSub$ = LEFT$(CurSub$, CurSubLen%)
SetSub D$ + ":\", ErrCode%
IF ErrCode% = 0 THEN
IF LEN(Label$) THEN
Lab$ = LEFT$(Label$ + SPACE$(11), 11)
SetLabel00 D$, Lab$, ErrCode%
ELSE
SetLabel01 D$, ErrCode%
END IF
SetSub D$ + ":" + CurSub$, ErrC%
ErrCode% = ErrCode% OR ErrC%
END IF
END IF
END IF
END SUB